package com.usian.mapper;

import com.usian.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserMapper {

    public void insertUser(User user);

    @Select("select * from user where userId=#{userId}")
    public List<User> fingAll(@Param("userId") Integer userId);

    @Select("select * from user")
    public List<User> findList();

    @Delete("delete from user where userId=#{userId}")
    void del(Integer userId);


    void update(User user);

    @Select("select * from user where userId=#{userId}")
    User upd(Integer userId);
}
